package com.leoandroid.tool.toolsbox.largeread.activity

import android.os.Bundle
import com.leoandroid.tool.toolsbox.largeread.databinding.ActivityMd5Binding

class MD5Activity: com.leoandroid.tool.toolsbox.largeread.activity.BaseActivity() {

    var bindingF: ActivityMd5Binding?=null
    val binding get() = bindingF!!

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        bindingF = ActivityMd5Binding.inflate(layoutInflater)
        setContentView(binding.root)
        binding.includeTitle.titleTv.text = "生成MD5"
        binding.includeTitle.backIv.setOnClickListener{
            finish()
        }

        binding.clear.setOnClickListener{
            binding.edit.setText("")
            binding.result.text = ""
        }

        binding.btn.setOnClickListener{
            val str = com.leoandroid.tool.toolsbox.largeread.utils.ToolUtils.stringToMD5(binding.edit.text.toString())
            binding.result.text = str
        }

    }
}